#include "Sort.h"

void TestMergeSort(void)
{
	int a[] = { 6, 1, 2, 7, 9, 3, 4, 5, 10, 8 };

	PrintArray(a, sizeof(a) / sizeof(a[0]));
	MergeSort(a, sizeof(a)/sizeof(a[0]));
	PrintArray(a, sizeof(a) / sizeof(a[0]));
}

void TestMergeSortNonR(void)
{
	int a[] = { 6, 1, 2, 7, 9, 3, 4, 5, 10, 8 };

	PrintArray(a, sizeof(a) / sizeof(a[0]));
	MergeSortNonR(a, sizeof(a) / sizeof(a[0]));
	PrintArray(a, sizeof(a) / sizeof(a[0]));
}

void TestCountSort(void)
{
	int a[] = {1, 2, 4, 3, 5, 1, 3, 2};

	PrintArray(a, sizeof(a) / sizeof(a[0]));
	CountSort(a, sizeof(a) / sizeof(a[0]));
	PrintArray(a, sizeof(a) / sizeof(a[0]));
}

int main()
{
	puts("\nMergeSort:");
	TestMergeSort();

	puts("\nMergeSortNonR:");
	TestMergeSortNonR();

	puts("\nCountSort:");
	TestCountSort();
	
	return 0;
}